<template>
	<div class="synthesize">
		<div class="title">放款信息</div>
		<div>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					姓名
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" :disabled="disabled" v-model="loanInfo.name"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					身份证号码
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" :disabled="disabled" v-model="loanInfo.identify"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					公司垫款日期
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" :disabled="disabled" v-model="loanInfo.companyAdvancedDate"></el-input>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					姓名：
					<label class="text">{{loanInfo.name}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					身份证号码：
					<label class="text">{{loanInfo.identify}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					公司垫款日期：
					<label class="text">{{loanInfo.companyAdvancedDate}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					银行放贷日期
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" :disabled="disabled" v-model="loanInfo.bankLoanDate"></el-input>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					银行放贷日期：
					<label class="text">{{loanInfo.bankLoanDate}}</label>
				</el-col>
			</el-row>
		</div>
		<div class="title">保险信息</div>
		<div>
			<div class="info-subtitle">商业险</div>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					保险公司
				</el-col>
				<el-col :span="5">
					<el-autocomplete class="info-input" @select="handleSelect" :fetch-suggestions="querySearchDealer" v-model="safeInfo.business.company" icon="search"></el-autocomplete>
				</el-col>
				<el-col :span="3" class="subTitle">
					保单号
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="safeInfo.business.policyNum"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					开始日期
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="safeInfo.business.creatTime" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					保险公司：
					<label class="text">{{safeInfo.business.company}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					保单号：
					<label class="text">{{safeInfo.business.policyNum}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					开始日期：
					<label class="text">{{safeInfo.business.creatTime}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					结束日期
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="safeInfo.business.endTime" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					结束日期：
					<label class="text">{{safeInfo.business.endTime}}</label>
				</el-col>
			</el-row>
			<div class="info-subtitle">交强险</div>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					保险公司
				</el-col>
				<el-col :span="5">
					<el-autocomplete class="info-input" @select="handleSelect_1" :fetch-suggestions="querySearchDealer_" v-model="safeInfo.vehicleInsurance.company_1" icon="search"></el-autocomplete>
				</el-col>
				<el-col :span="3" class="subTitle">
					保单号
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="safeInfo.vehicleInsurance.policyNum"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					开始日期
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="safeInfo.vehicleInsurance.creatTime" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					保险公司：
					<label class="text">{{safeInfo.vehicleInsurance.company_1}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					保单号：
					<label class="text">{{safeInfo.vehicleInsurance.policyNum}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					开始日期：
					<label class="text">{{safeInfo.vehicleInsurance.creatTime}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					结束日期
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="safeInfo.vehicleInsurance.endTime" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					结束日期：
					<label class="text">{{safeInfo.vehicleInsurance.endTime}}</label>
				</el-col>
			</el-row>
			<div class="info-subtitle">保险明细</div>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					车船费
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="insuranceInfo.fare">
						<template slot="append">元</template>
					</el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					商业保险费
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="insuranceInfo.businessInsurance">
						<template slot="append">元</template>
					</el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					交强保险费
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="insuranceInfo.vehicleInsurance">
						<template slot="append">元</template>
					</el-input>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					车船费：
					<label class="text">{{insuranceInfo.fare}}元</label>
				</el-col>
				<el-col :span="8" class="info-label">
					商业保险费：
					<label class="text">{{insuranceInfo.businessInsurance}}元</label>
				</el-col>
				<el-col :span="8" class="info-label">
					交强险保费：
					<label class="text">{{insuranceInfo.vehicleInsurance}}元</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					合计
				</el-col>
				<el-col :span="5">
					<el-input :disabled="disabled" class="info-input" v-model="insuranceInfo.total">
						<template slot="append">元</template>
					</el-input>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					合计：
					<label class="text">{{insuranceInfo.total}}元</label>
				</el-col>
			</el-row>
		</div>
		<div class="title">出险信息</div>
		<div>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					出险金额
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="lossInfo.money">
						<template slot="append">元</template>
					</el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					出险日期
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="lossInfo.date" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					出险金额：
					<label class="text">{{lossInfo.money}}元</label>
				</el-col>
				<el-col :span="8" class="info-label">
					出险日期：
					<label class="text">{{lossInfo.date}}</label>
				</el-col>
			</el-row>
		</div>
		<div class="title">车辆信息</div>
		<div>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					车辆类别
				</el-col>
				<el-col :span="5">
					<el-select class="info-select" v-model="carInfo.type" placeholder="请选择">
						<el-option v-for="item in $store.state.carOriginType" :key="item.value" :label="item.label" :value="item.value">
						</el-option>
					</el-select>
				</el-col>
				<el-col :span="3" class="subTitle">
					发票开具单位
				</el-col>
				<el-col :span="13">
					<el-input class="info-input" v-model="carInfo.invoicesCompany"></el-input>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					车辆类别：
					<label class="text">{{carInfo.type_name}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					发票开具单位：
					<label class="text">{{carInfo.invoicesCompany}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					发票号
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="carInfo.invoicesCode"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					车架号
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="carInfo.vinNo"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					发动机号
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="carInfo.engineNo"></el-input>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					发票号：
					<label class="text">{{carInfo.invoicesCode}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					车架号：
					<label class="text">{{carInfo.vinNo}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					发动机号：
					<label class="text">{{carInfo.engineNo}}</label>
				</el-col>
			</el-row>
		</div>
		<div class="title">公证抵押</div>
		<div>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					上牌登记日
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="notarialMortgage.registrationDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
				<el-col :span="3" class="subTitle">
					上牌地
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="notarialMortgage.registrationAddress"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					车牌
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="notarialMortgage.plateNumber"></el-input>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					上牌登记日：
					<label class="text">{{notarialMortgage.registrationDate}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					上牌地：
					<label class="text">{{notarialMortgage.registrationAddress}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					车牌：
					<label class="text">{{notarialMortgage.plateNumber}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					抵押办理日
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="notarialMortgage.mortgageDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
				<el-col :span="3" class="subTitle">
					公证书送交日
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="notarialMortgage.notarizationServeDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
				<el-col :span="3" class="subTitle">
					收到公证书日
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="notarialMortgage.notarizationGetDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					抵押办理日：
					<label class="text">{{notarialMortgage.mortgageDate}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					公证书送交日：
					<label class="text">{{notarialMortgage.notarizationServeDate}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					收到公证书日：
					<label class="text">{{notarialMortgage.notarizationGetDate}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					公证书寄出日
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="notarialMortgage.notarizationSendDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
				<el-col :span="3" class="subTitle">
					登记证书号
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="notarialMortgage.notarizationCode"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					登记证书和发票收到日
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="notarialMortgage.notarizationAndinvoiceGetDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					公证书寄出日：
					<label class="text">{{notarialMortgage.notarizationSendDate}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					登记证书号：
					<label class="text">{{notarialMortgage.notarizationCode}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					登记证书和发票收到日：
					<label class="text">{{notarialMortgage.notarizationAndinvoiceGetDate}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					抵押材料送交银行日
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="notarialMortgage.mortgageToBankDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
				<!-- <el-col :span="3" class="subTitle">
					办理抵押日期
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="notarialMortgage.dealMortgageDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col> -->
				<el-col :span="3" class="subTitle">
					是否办理成功
				</el-col>
				<el-col :span="5">
					<el-select class="info-select" v-model="notarialMortgage.isMortgageSuccess" placeholder="请选择">
						<el-option v-for="item in $store.state.isSuccess" :key="item.value" :label="item.label" :value="item.value">
						</el-option>
					</el-select>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					抵押材料送交银行日：
					<label class="text">{{notarialMortgage.mortgageToBankDate}}</label>
				</el-col>
				<!-- <el-col :span="8" class="info-label">
					办理抵押日期：
					<label class="text">{{notarialMortgage.dealMortgageDate}}</label>
				</el-col> -->
				<el-col :span="8" class="info-label">
					是否办理成功：
					<label class="text">{{notarialMortgage.isMortgageSuccess_name}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					借登记证书日期
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="notarialMortgage.CertificateOfRegistrationDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
				<el-col :span="3" class="subTitle">
					抵押送交车管所日
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="notarialMortgage.mortgageToTrafficDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
				<el-col :span="3" class="subTitle">
					抵押从车管所领回日
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="notarialMortgage.mortgageGetByTrafficDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					借登记证书日期：
					<label class="text">{{notarialMortgage.CertificateOfRegistrationDate}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					抵押送交车管所日：
					<label class="text">{{notarialMortgage.mortgageToTrafficDate}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					抵押从车管所领回日：
					<label class="text">{{notarialMortgage.mortgageGetByTrafficDate}}</label>
				</el-col>
			</el-row>
		</div>
		<div class="title">合同齐全</div>
		<div>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					合同送交银行日
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="contract.toBank.toBankDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					合同送交银行日：
					<label class="text">{{contract.toBank.toBankDate}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col class="subTitle" :span="3">合同送交备注</el-col>
				<el-col :span="13">
					<el-input class="info-textarea" :rows="3" type="textarea" placeholder="请输入" v-model="contract.toBank.toBankRemark"></el-input>
				</el-col>
			</el-row>
			<el-row class="info-row resultShrink" v-show="isEdit == false">
				<el-col class="subtitle" :span="3">合同送交备注</el-col>
				<el-col :span="12" class="text-height text-height-shrink" id='toBankRemark'>
					{{ contract.toBank.toBankRemark }}
				</el-col>
				<el-col :span="3">
					<el-button class="credit-button-text" type="text" @click="$libs.changeHeight('toBankRemark', contract.toBank)">{{ contract.toBank.shrinkText}}</el-button>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					合同齐全日
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="contract.complete.completeDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					合同齐全日：
					<label class="text">{{contract.complete.completeDate}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col class="subTitle" :span="3">合同齐全备注</el-col>
				<el-col :span="13">
					<el-input class="info-textarea" :rows="3" type="textarea" placeholder="请输入" v-model="contract.complete.completeRemark"></el-input>
				</el-col>
			</el-row>
			<el-row class="info-row resultShrink" v-show="isEdit == false">
				<el-col class="subtitle" :span="3">合同齐全备注</el-col>
				<el-col :span="12" class="text-height text-height-shrink" id='completeRemark'>
					{{ contract.complete.completeRemark }}
				</el-col>
				<el-col :span="3">
					<el-button class="credit-button-text" type="text" @click="$libs.changeHeight('completeRemark', contract.complete)">{{ contract.complete.shrinkText}}</el-button>
				</el-col>
			</el-row>
		</div>
		<div class="title">寄卡</div>
		<div>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					还款信用卡账号
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" :disabled="disabled" v-model="sendCardInfo.account"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					快递单号
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="sendCardInfo.courierNumber"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					快递公司
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="sendCardInfo.courierCompany"></el-input>
					<!-- <el-select class="info-select" v-model="sendCardInfo.courierCompany" placeholder="请选择">
						<el-option v-for="item in $store.state.courierCompany" :key="item.value" :label="item.label" :value="item.value">
						</el-option>
					</el-select> -->
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					还款信用卡账号：
					<label class="text">{{sendCardInfo.account}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					快递单号：
					<label class="text">{{sendCardInfo.courierNumber}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					快递公司：
					<label class="text">{{sendCardInfo.courierCompany}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					邮寄地址
				</el-col>
				<el-col :span="13">
					<el-input class="info-input" v-model="sendCardInfo.address"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					银行账单日期
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" type="number" v-model="sendCardInfo.bankAccountDate"></el-input>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="12" class="info-label">
					邮寄地址：
					<label class="text">{{sendCardInfo.address}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					银行账单日期：
					<label class="text">{{sendCardInfo.bankAccountDate}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					银行还款日期
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" type="number" v-model="sendCardInfo.bankRepaymentDate"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					银行扣款日期
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" type="number" v-model="sendCardInfo.bankPayDate"></el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					还款卡寄出日期
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="sendCardInfo.sendDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					银行还款日期：
					<label class="text">{{sendCardInfo.bankRepaymentDate}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					银行扣款日期：
					<label class="text">{{sendCardInfo.bankPayDate}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					还款卡寄出日期：
					<label class="text">{{sendCardInfo.sendDate}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					首月还款额
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="sendCardInfo.firstPay">
						<template slot="append">元</template>
					</el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					月还款额
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="sendCardInfo.monthPay">
						<template slot="append">元</template>
					</el-input>
				</el-col>
				<el-col :span="3" class="subTitle">
					末月还款额
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="sendCardInfo.lastPay">
						<template slot="append">元</template>
					</el-input>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					首月还款额：
					<label class="text">{{sendCardInfo.firstPay}}元</label>
				</el-col>
				<el-col :span="8" class="info-label">
					月还款额：
					<label class="text">{{sendCardInfo.monthPay}}元</label>
				</el-col>
				<el-col :span="8" class="info-label">
					末月还款额：
					<label class="text">{{sendCardInfo.lastPay}}元</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col class="subTitle" :span="3">备注</el-col>
				<el-col :span="13">
					<el-input class="info-textarea" :rows="3" type="textarea" placeholder="请输入" v-model="sendCardInfo.remark"></el-input>
				</el-col>
			</el-row>
			<el-row class="info-row resultShrink" v-show="isEdit == false">
				<el-col class="subtitle" :span="3">备　　注</el-col>
				<el-col :span="12" class="text-height text-height-shrink" id='sendCardInfo'>
					{{ sendCardInfo.remark }}
				</el-col>
				<el-col :span="3">
					<el-button class="credit-button-text" type="text" @click="$libs.changeHeight('sendCardInfo', sendCardInfo)">{{ sendCardInfo.shrinkText}}</el-button>
				</el-col>
			</el-row>
		</div>
		<div class="title">退保证金</div>
		<div>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					开户银行
				</el-col>
				<el-col :span="5">
					<el-select class="info-select" v-model="bailInfo.bank" placeholder="请选择">
						<el-option v-for="item in $store.state.bank" :key="item.value" :label="item.label" :value="item.value">
						</el-option>
					</el-select>
				</el-col>
				<el-col :span="3" class="subTitle">
					银行账号
				</el-col>
				<el-col :span="5">
					<el-input class="info-input" v-model="bailInfo.account"></el-input>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					开户银行：
					<label class="text">{{bailInfo.bankName}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					银行账号：
					<label class="text">{{bailInfo.account}}</label>
				</el-col>
			</el-row>
		</div>
		<div class="title">结清</div>
		<div>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col :span="3" class="subTitle">
					提前结清日期
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="settleInfo.advanceDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
				<el-col :span="3" class="subTitle">
					正常结清日期
				</el-col>
				<el-col :span="5">
					<el-date-picker class="info-input" v-model="settleInfo.normalDate" type="date" placeholder="请选择日期">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == false">
				<el-col :span="8" class="info-label">
					提前结清日期：
					<label class="text">{{settleInfo.advanceDate}}</label>
				</el-col>
				<el-col :span="8" class="info-label">
					正常结清日期：
					<label class="text">{{settleInfo.normalDate}}</label>
				</el-col>
			</el-row>
			<el-row class="info-row" v-show="isEdit == true">
				<el-col class="subTitle" :span="3">备注</el-col>
				<el-col :span="13">
					<el-input class="info-textarea" :rows="3" type="textarea" placeholder="请输入" v-model="settleInfo.remark"></el-input>
				</el-col>
			</el-row>
			<el-row class="info-row resultShrink" v-show="isEdit == false">
				<el-col class="subtitle" :span="3">备　　注</el-col>
				<el-col :span="12" class="text-height text-height-shrink" id='settleInfo'>
					{{ settleInfo.remark }}
				</el-col>
				<el-col :span="3">
					<el-button class="credit-button-text" type="text" @click="$libs.changeHeight('settleInfo', settleInfo)">{{ settleInfo.shrinkText}}</el-button>
				</el-col>
			</el-row>
		</div>
	</div>
</template>
<script>
export default {
	name: 'synthesize',
	data() {
		return {
			isEdit: false,
			disabled: true,
			isMust: false,
			isSave: 0,
			insuranceCom: '',
			insuranceComId: '',
			insuranceCom_1: '',
			insuranceComId_1: '',
			loanInfo: {
				name: '',
				identify: '', //身份证号码
				companyAdvancedDate: '', //公司垫款日期
				bankLoanDate: '', //银行放贷日期
			},
			safeInfo: {
				business: {
					company: '', //保险公司
					policyNum: '', //保单号
					creatTime: '', //开始时间
					endTime: '', //结束时间
				},
				vehicleInsurance: {
					company_1: '', //保险公司
					policyNum: '', //保单号
					creatTime: '', //开始时间
					endTime: '', //结束时间
				}
			},
			insuranceInfo: {
				fare: '', //车船费
				businessInsurance: '', //商业保险
				vehicleInsurance: '', //交强保险
				total: '', //合计
			},
			lossInfo: {
				money: '', //出险金额
				date: '', //出险日期
			},
			carInfo: {
				type: '', //车辆类别
				type_name: '',
				invoicesCompany: '', //发票开具单位
				invoicesCode: '', //发票号
				vinNo: '', //车架号
				engineNo: '', //发动机号
			},
			notarialMortgage: {
				registrationDate: '', //上牌登记日
				registrationAddress: '', //上牌地
				plateNumber: '', //车牌
				mortgageDate: '', //抵押办理日
				notarizationServeDate: '', //公证书送交日
				notarizationGetDate: '', //收到公证书日
				notarizationSendDate: '', //公证书寄出日
				notarizationCode: '', //登记证书号
				notarizationAndinvoiceGetDate: '', //登记证书和发票收到日
				mortgageToBankDate: '', //抵押材料送交银行日
				dealMortgageDate: '', //办理抵押日期
				isMortgageSuccess: '', //是否办理成功
				isMortgageSuccess_name: '',
				CertificateOfRegistrationDate: '', //借登记证书日期
				mortgageToTrafficDate: '', //抵押送交车管所日
				mortgageGetByTrafficDate: '', //抵押从车管所领回日
			},
			contract: {
				toBank: {
					toBankDate: '', //合同送交银行日
					toBankRemark: '', //合同送交备注
					shrink: false,
					shrinkText: '展开全部'
				},
				complete: {
					completeDate: '', //合同齐全日
					completeRemark: '', //合同齐全备注
					shrink: false,
					shrinkText: '展开全部'
				}
			},
			sendCardInfo: {
				account: '', //还款信用卡账号
				courierNumber: '', //快递单号
				courierCompany: '', //快递公司
				courierCompany_name: '',
				address: '', //邮寄地址
				bankAccountDate: '', //银行账单日期
				bankRepaymentDate: '', //银行还款日期
				bankPayDate: '', //银行扣款日期
				sendDate: '', //还款卡寄出日期
				firstPay: '', //首月还款额
				monthPay: '', //月还款额
				lastPay: '', //末月还款额
				remark: '', //备注
				shrink: false,
				shrinkText: '展开全部'
			},
			bailInfo: {
				bank: '', //开户银行
				account: '', //银行账号
				bankName: '',
			},
			settleInfo: {
				advanceDate: '', //提前结清日期
				normalDate: '', //正常结清日期
				remark: '', //备注
				shrink: false,
				shrinkText: '展开全部'
			}
		}
	},
	watch: {
		isSave: function(_cur, _old) {
			if (_cur == 8) {
				this.$libs.successAlert(this, {
					title: '综合处理信息保存成功！',
					theme: '保存成功',
					enter: '知道了'
				});
			}
		},
		'insuranceInfo.businessInsurance': function(_cur, _old) {
			this.cucalTotal();
		},
		'insuranceInfo.fare': function(_cur, _old) {
			this.cucalTotal();
		},
		'insuranceInfo.vehicleInsurance': function(_cur, _old) {
			this.cucalTotal();
		},
		'sendCardInfo.bankAccountDate': function(_cur, _old) {
			if (_cur && (_cur < 1 || _cur > 31)) {
				this.$message.error('银行账单日期请输入区间为1-31的数字');
				this.sendCardInfo.bankAccountDate = '';
			}
		},
		'sendCardInfo.bankRepaymentDate': function(_cur, _old) {
			if (_cur && (_cur < 1 || _cur > 31)) {
				this.$message.error('银行还款日期请输入区间为1-31的数字');
				this.sendCardInfo.bankRepaymentDate = '';
			}
		},
		'sendCardInfo.bankPayDate': function(_cur, _old) {
			if (_cur && (_cur < 1 || _cur > 31)) {
				this.$message.error('银行扣款日期请输入区间为1-31的数字');
				this.sendCardInfo.bankPayDate = '';
			}
		},
		deep: true
	},
	methods: {
		handleSelect_1(item) {
			this.insuranceCom_1 = item.value
			this.insuranceComId_1 = item.id
		},
		handleSelect(item) {
			this.insuranceCom = item.value
			this.insuranceComId = item.id
		},
		querySearchDealer_(queryString, cb) {
			let that = this
			var result = []
			this.$http.get('/order/generalInfo/selectByInsurance', {
					params: {
						dataGroup: 'insuranceCompany',
						name: this.safeInfo.vehicleInsurance.company_1
					}
				})
				.then((response) => {
					$.each(response.data.data, function(index, value) {
						result.push({ value: value.name, id: value.dataId })
					})
					clearTimeout(that.timeout)
					that.timeout = setTimeout(() => {
						cb(result);
					}, 3000 * Math.random())
				})
				.catch((error) => {
					console.log(error)
				})
		},
		querySearchDealer(queryString, cb) {
			let that = this
			var result = []
			this.$http.get('/order/generalInfo/selectByInsurance', {
					params: {
						dataGroup: 'insuranceCompany',
						name: this.safeInfo.business.company
					}
				})
				.then((response) => {
					$.each(response.data.data, function(index, value) {
						result.push({ value: value.name, id: value.dataId })
					})
					clearTimeout(that.timeout)
					that.timeout = setTimeout(() => {
						cb(result);
					}, 3000 * Math.random())
				})
				.catch((error) => {
					console.log(error)
				})
		},
		cucalTotal() {
			this.insuranceInfo.total = (parseFloat(this.insuranceInfo.businessInsurance) ? parseFloat(this.insuranceInfo.businessInsurance) : 0) + (parseFloat(this.insuranceInfo.fare) ? parseFloat(this.insuranceInfo.fare) : 0) + (parseFloat(this.insuranceInfo.vehicleInsurance) ? parseFloat(this.insuranceInfo.vehicleInsurance) : 0);
		},
		getData(_id) {
			this.$http.get('/order/generalInfo/' + _id).then((data) => {
				if (data.data.success) {
					let datas = data.data.data;
					if (datas.loanInfo) {
						this.loanInfo = {
							name: datas.loanInfo.customerName,
							identify: datas.loanInfo.customerIdCard, //身份证号码
							companyAdvancedDate: datas.loanInfo.loaningDate, //公司垫款日期
							bankLoanDate: datas.loanInfo.bankLoanDate, //银行放贷日期
						};
					};
					if (datas.insurance.length > 0) {
						datas.insurance.forEach((data) => {
							if (data.insType == '1') {
								// 商业险
								this.safeInfo.business = {
									company: data.insCompanyName, //保险公司-商业险
									policyNum: data.insNo, //保单号
									creatTime: data.effectiveDate, //开始时间
									endTime: data.expiryDate, //结束时间
									insId: data.insId ? data.insId : '',
									insCompanyId: data.insCompanyId ? data.insCompanyId : '',
									premium: data.premium
								}
								this.insuranceInfo.businessInsurance = data.premium;
							} else if (data.insType == '0') {
								// 交强险
								this.safeInfo.vehicleInsurance = {
									company_1: data.insCompanyName, //保险公司-交强险
									policyNum: data.insNo, //保单号
									creatTime: data.effectiveDate, //开始时间
									endTime: data.expiryDate, //结束时间
									insId: data.insId,
									insCompanyId: data.insCompanyId,

								};
								this.insuranceInfo.fare = data.vehicleVesselTax;
								this.insuranceInfo.vehicleInsurance = data.premium;
							}
							this.insuranceInfo.total += parseInt(data.premium) ? parseInt(data.premium) : 0;
						});
					};
					this.lossInfo = {
						accidentId: datas.accident.accidentId, //编号
						money: datas.accident.lossAmount, //出险金额
						date: datas.accident.accidentDate, //出险日期
					};
					this.carInfo = {
						type: this.$libs.toInt(datas.carInfo.carSpec), //车辆类别
						type_name: this.$libs.jsonGetName(this.$store.state.barVehicleComposition, datas.carInfo.isNewCar),
						invoicesCompany: datas.carInfo.invoiceVendor, //发票开具单位
						invoicesCode: datas.carInfo.invoiceNum, //发票号
						vinNo: datas.carInfo.vinNo, //车架号
						engineNo: datas.carInfo.engineNum, //发动机号
						carId: datas.carInfo.carId,
					};
					this.notarialMortgage = {
						registrationDate: datas.notaryMortgage.registryDate, //上牌登记日
						registrationAddress: datas.notaryMortgage.registryAddr, //上牌地
						plateNumber: datas.notaryMortgage.licensePlateNo, //车牌
						mortgageDate: datas.notaryMortgage.mrgeDate, //抵押办理日
						notarizationServeDate: datas.notaryMortgage.notarSubmitDate, //公证书送交日
						notarizationGetDate: datas.notaryMortgage.notarReceiptDate, //收到公证书日
						notarizationSendDate: datas.notaryMortgage.notarPostDate, //公证书寄出日
						notarizationCode: datas.notaryMortgage.regCertNo, //登记证书号
						notarizationAndinvoiceGetDate: datas.notaryMortgage.regCertReceiptDate, //登记证书和发票收到日
						mortgageToBankDate: datas.notaryMortgage.submitBankDate, //抵押材料送交银行日
						dealMortgageDate: datas.notaryMortgage.mrgeDate, //办理抵押日期
						isMortgageSuccess: datas.notaryMortgage.mrgeState, //是否办理成功
						isMortgageSuccess_name: this.$libs.jsonGetName(this.$store.state.isSuccess, datas.notaryMortgage.mrgeState),
						CertificateOfRegistrationDate: datas.notaryMortgage.borrowRegCertDate, //借登记证书日期
						mortgageToTrafficDate: datas.notaryMortgage.mrgeSendCarAdminDate, //抵押送交车管所日
						mortgageGetByTrafficDate: datas.notaryMortgage.mrgeBackDate, //抵押从车管所领回日
						mortgageId: datas.notaryMortgage.mortgageId
					};
					this.contract = {
						id: datas.contractSubmit.contractSubmitId,
						toBank: {
							toBankDate: datas.contractSubmit.submitDate, //合同送交银行日
							toBankRemark: datas.contractSubmit.submitRemark, //合同送交备注
							shrink: false,
							shrinkText: '展开全部'
						},
						complete: {
							completeDate: datas.contractSubmit.completeDate, //合同齐全日
							completeRemark: datas.contractSubmit.completeRemark, //合同齐全备注
							shrink: false,
							shrinkText: '展开全部'
						}
					};
					this.sendCardInfo = {
						account: datas.postBankCardForm.repayAccount, //还款信用卡账号
						courierNumber: datas.postBankCardForm.expressCompany, //快递单号
						courierCompany: datas.postBankCardForm.expressNo, //快递公司
						// courierCompany_name: this.$libs.jsonGetName(this.$store.state.courierCompany, datas.postBankCardForm.expressNo),
						address: datas.postBankCardForm.mailingAddress, //邮寄地址
						bankAccountDate: datas.postBankCardForm.billingDay, //银行账单日期
						bankRepaymentDate: datas.postBankCardForm.repayDay, //银行还款日期
						bankPayDate: datas.postBankCardForm.debitDay, //银行扣款日期
						sendDate: datas.postBankCardForm.postDate, //还款卡寄出日期
						firstPay: datas.postBankCardForm.firstRepayAmount, //首月还款额
						monthPay: datas.postBankCardForm.monthRepayAmount, //月还款额
						lastPay: datas.postBankCardForm.lastRepayAmount, //末月还款额
						remark: datas.postBankCardForm.remark, //备注
						shrink: false,
						shrinkText: '展开全部',
						postCardId: datas.postBankCardForm.postCardId
					};
					this.bailInfo = {
						id: datas.refundDeposit.refundId,
						bank: datas.refundDeposit.bankId, //开户银行
						bankName: datas.refundDeposit.bankName,
						account: datas.refundDeposit.bankCardNo, //银行账号
					};
					this.settleInfo = {
						id: datas.loanClear.id,
						advanceDate: datas.loanClear.advanceSettleDate, //提前结清日期
						normalDate: datas.loanClear.normalSettleDate, //正常结清日期
						remark: datas.loanClear.remark, //备注
						shrink: false,
						shrinkText: '展开全部',
						clearId: datas.loanClear.clearId,
					};
				}
			}).catch((error) => {

			});
		},
		enterDate(_id, _isMust) {
			let param = {
				"accident": {
					"accidentDate": this.lossInfo.date,
					"accidentId": this.lossInfo.accidentId,
					"lossAmount": this.lossInfo.money,
					"orderNo": _id
				},
				"carInfo": {
					// "carAge": 0,
					"carId": this.carInfo.carId,
					// "carLevel": this.carInfo.type,
					// "carModel": "string",
					// "carOwner": "string",
					// "carSpec": 0,
					// "dealPrice": 0,
					// "dealerId": "string",
					// "dealerName": "string",
					"engineNum": this.carInfo.engineNo,
					// "guidePrice": 0,
					"invoiceNum": this.carInfo.invoicesCode,
					"invoiceVendor": this.carInfo.invoicesCompany,
					"isNewCar": this.carInfo.type,
					// "licensePlateAddr": "string",
					// "licensePlateType": 0,
					"orderNo": _id,
					// "renewalInsurance": true,
					// "seats": 0,
					"vinNo": this.carInfo.vinNo,
				},
				"contractSubmit": {
					"completeDate": this.contract.complete.completeDate,
					"completeRemark": this.contract.complete.completeRemark,
					"orderNo": _id,
					"submitDate": this.contract.toBank.toBankDate,
					"submitRemark": this.contract.toBank.toBankRemark,
					id: this.contract.id,
				},
				"insurance": [{
					"effectiveDate": this.safeInfo.business.creatTime,
					"expiryDate": this.safeInfo.business.endTime,
					"insCompanyId": this.safeInfo.business.insCompanyId,
					"insCompanyName": this.safeInfo.business.safeCompany,
					"insId": this.safeInfo.business.insId,
					"insNo": this.safeInfo.business.policyNum,
					"insType": 1,
					"orderNo": _id,
					"premium": this.insuranceInfo.businessInsurance,
				}, {
					"effectiveDate": this.safeInfo.vehicleInsurance.creatTime,
					"expiryDate": this.safeInfo.vehicleInsurance.endTime,
					"insCompanyId": this.safeInfo.vehicleInsurance.insCompanyId,
					"insCompanyName": this.safeInfo.vehicleInsurance.safeCompany,
					"insId": this.safeInfo.vehicleInsurance.insId,
					"insNo": this.safeInfo.vehicleInsurance.policyNum,
					"insType": 0,
					"orderNo": _id,
					"premium": this.insuranceInfo.vehicleInsurance,
					"vehicleVesselTax": this.insuranceInfo.fare
				}],
				"loanClear": {
					"advanceSettleDate": this.settleInfo.advanceDate,
					"clearId": this.settleInfo.clearId,
					// "isDeleted": 0,
					"normalSettleDate": this.settleInfo.normalDate,
					"orderNo": _id,
					"remark": this.settleInfo.remark,
				},
				"loanInfo": {
					"bankLoanDate": this.loanInfo.bankLoanDate ? this.loanInfo.bankLoanDate : '',
					// "customerIdCard": "string",
					"customerName": this.loanInfo.name ? this.loanInfo.name : '',
					// "loaningDate": "2017-09-01",
					"orderNo": _id,
					customerIdCard: this.loanInfo.identify,
					loaningDate: this.loanInfo.companyAdvancedDate,
				},
				"notaryMortgage": {
					"borrowRegCertDate": this.notarialMortgage.CertificateOfRegistrationDate,
					"licensePlateNo": this.notarialMortgage.plateNumber,
					"mortgageId": this.notarialMortgage.mortgageId,
					"mrgeBackDate": this.notarialMortgage.mortgageGetByTrafficDate,
					// "mrgeDate": this.notarialMortgage.dealMortgageDate,
					"mrgeSendCarAdminDate": this.notarialMortgage.mortgageToTrafficDate,
					"mrgeState": this.notarialMortgage.isMortgageSuccess,
					"notarPostDate": this.notarialMortgage.notarizationSendDate,
					"notarReceiptDate": this.notarialMortgage.notarizationGetDate,
					"notarSubmitDate": this.notarialMortgage.notarizationServeDate,
					"orderNo": _id,
					"regCertNo": this.notarialMortgage.notarizationCode,
					"regCertReceiptDate": this.notarialMortgage.notarizationAndinvoiceGetDate,
					"registryAddr": this.notarialMortgage.registrationAddress,
					"registryDate": this.notarialMortgage.registrationDate,
					"submitBankDate": this.notarialMortgage.mortgageToBankDate,
				},
				"postBankCardForm": {
					"billingDay": this.sendCardInfo.bankAccountDate,
					"debitDay": this.sendCardInfo.bankPayDate,
					"expressCompany": this.sendCardInfo.courierNumber,
					"expressNo": this.sendCardInfo.courierCompany,
					"firstRepayAmount": this.sendCardInfo.firstPay,
					// "isDeleted": 0,
					"mailingAddress": this.sendCardInfo.address,
					"monthRepayAmount": this.sendCardInfo.monthPay,
					"orderNo": _id,
					"postCardId": this.sendCardInfo.postCardId,
					"postDate": this.sendCardInfo.sendDate,
					"remark": this.sendCardInfo.remark,
					"repayAccount": this.sendCardInfo.account,
					"repayDay": this.sendCardInfo.bankRepaymentDate,
				},
				"refundDeposit": {
					"bankCardNo": this.bailInfo.account,
					"bankId": this.bailInfo.bank,
					// "bankName": "string",
					// "isDeleted": 0,
					"id": _id,
					// "refundId": 0
				}
			};
			if (_isMust && !this.$libs.mustWrite(param, ['loanInfo.bankLoanDate', 'loanInfo.companyAdvancedDate'])) {
				this.$store.commit('isAllMustFalse');
				this.$libs.noneAddHightBorder();
				return;
			} else if (_isMust) {
				// this.$store.commit('isAllMustTrue');
			}
			console.log(param);
			this.$http.post('/order/generalInfo/' + _id, param).then((data) => {

			}).catch((error) => {

			});
		},
		insurance(_id) {
			let param = [{
				"effectiveDate": this.safeInfo.business.creatTime,
				"expiryDate": this.safeInfo.business.endTime,
				"insCompanyId": this.insuranceComId ? this.safeInfo.business.insCompanyId : this.insuranceComId,
				"insCompanyName": this.insuranceCom ? this.safeInfo.business.company : this.insuranceCom,
				"insId": this.safeInfo.business.insId,
				"insNo": this.safeInfo.business.policyNum,
				"insType": '1',
				"orderNo": _id,
				"premium": this.insuranceInfo.businessInsurance,
			}, {
				"effectiveDate": this.safeInfo.vehicleInsurance.creatTime,
				"expiryDate": this.safeInfo.vehicleInsurance.endTime,
				"insCompanyId": (this.insuranceComId_1 == '') ? this.safeInfo.vehicleInsurance.insCompanyId : this.insuranceComId_1,
				"insCompanyName": (this.insuranceCom_1 == '') ? this.safeInfo.vehicleInsurance.company_1 : this.insuranceCom_1,
				"insId": this.safeInfo.vehicleInsurance.insId,
				"insNo": this.safeInfo.vehicleInsurance.policyNum,
				"insType": '0',
				"orderNo": _id,
				"premium": this.insuranceInfo.vehicleInsurance,
				"vehicleVesselTax": this.insuranceInfo.fare
			}];
			$.each(param, (index, el) => {
				$.each(el, (i, val) => {
					console.log(val);
					if (val == undefined) {
						param[index][i] = null;
					} else if (typeof val == 'object' && new Date(val).getTime() > 0 && !isNaN(new Date(val).getTime())) {
						param[index][i] = this.$libs.formatDate(new Date(val), 'yyyy-MM-dd hh:mm:ss');
						console.log(param[index][i]);
					}
				});
			});
			// if (this.isMust && !this.$libs.mustWrite(param)) {
			// 	this.$message.error('请补充完整保险信息');
			// 	return;
			// }
			console.log(param);
			this.$http.post('/order/generalInfo/Insurance/' + _id, param).then((data) => {
				if (data.data.success) {
					this.isSave++;
				}
			}).catch((error) => {

			});
		},
		accident(_id) {
			let param = {
				"accidentDate": this.lossInfo.date,
				"accidentId": this.lossInfo.accidentId,
				"lossAmount": this.lossInfo.money,
				"orderNo": _id
			};
			$.each(param, (index, val) => {
				if (val == undefined) {
					param[index] = null;
				} else if (typeof val == 'object' && new Date(val).getTime() > 0 && !isNaN(new Date(val).getTime())) {
					param[index] = this.$libs.formatDate(new Date(val), 'yyyy-MM-dd hh:mm:ss');
				}
			});
			if (this.isMust && !this.$libs.mustWrite(param)) {
				this.$message.error('请补充完整出险信息');
				this.$libs.noneAddHightBorder();
				return;
			}
			console.log(param);
			this.$http.post('/order/generalInfo/accident/' + _id, param).then((data) => {
				if (data.data.success) {
					this.isSave++;
				}
			}).catch((error) => {

			});
		},
		carInfos(_id) {
			let param = {
				"carId": this.carInfo.carId,
				"carLevel": this.carInfo.type,
				"engineNum": this.carInfo.engineNo,
				"invoiceNum": this.carInfo.invoicesCode,
				"invoiceVendor": this.carInfo.invoicesCompany,
				"orderNo": _id,
				"vinNo": this.carInfo.vinNo,
			};
			$.each(param, (index, val) => {
				if (val == undefined) {
					param[index] = null;
				} else if (typeof val == 'object' && new Date(val).getTime() > 0 && !isNaN(new Date(val).getTime())) {
					param[index] = this.$libs.formatDate(new Date(val), 'yyyy-MM-dd hh:mm:ss');
				}
			});
			if (this.isMust && !this.$libs.mustWrite(param)) {
				this.$message.error('请补充完整车辆信息');
				this.$libs.noneAddHightBorder();
				return;
			}
			console.log(param);
			this.$http.post('/order/generalInfo/carInfo/' + _id, param).then((data) => {
				if (data.data.success) {
					this.isSave++;
				}
			}).catch((error) => {

			});
		},
		contractSubmit(_id) {
			let param = {
				"completeDate": this.contract.complete.completeDate,
				"completeRemark": this.contract.complete.completeRemark,
				"orderNo": _id,
				"submitDate": this.contract.toBank.toBankDate,
				"submitRemark": this.contract.toBank.toBankRemark,
				"contractSubmitId": this.contract.id,
			};
			$.each(param, (index, val) => {
				if (val == undefined) {
					param[index] = null;
				} else if (typeof val == 'object' && new Date(val).getTime() > 0 && !isNaN(new Date(val).getTime())) {
					param[index] = this.$libs.formatDate(new Date(val), 'yyyy-MM-dd hh:mm:ss');
				}
			});
			if (this.isMust && !this.$libs.mustWrite(param)) {
				this.$message.error('请补充完整合同信息');
				this.$libs.noneAddHightBorder();
				return;
			}
			console.log(param);
			this.$http.post('/order/generalInfo/contractSubmit/' + _id, param).then((data) => {
				if (data.data.success) {
					this.isSave++;
				}
			}).catch((error) => {

			});
		},
		depositForm(_id) {
			let param = {
				"bankCardNo": this.bailInfo.account,
				"bankId": this.bailInfo.bank,
				"refundId": this.bailInfo.id,
			};
			$.each(param, function(index, val) {
				if (val == undefined) {
					param[index] = null;
				}
			});
			if (this.isMust && !this.$libs.mustWrite(param)) {
				this.$message.error('请补充完整开户信息');
				this.$libs.noneAddHightBorder();
				return;
			}
			console.log(param);
			this.$http.post('/order/generalInfo/depositForm/' + _id, param).then((data) => {
				if (data.data.success) {
					this.isSave++;
				}
			}).catch((error) => {

			});
		},
		loanClear(_id) {
			let param = {
				"advanceSettleDate": this.settleInfo.advanceDate,
				"clearId": this.settleInfo.clearId,
				"normalSettleDate": this.settleInfo.normalDate,
				"orderNo": _id,
				"remark": this.settleInfo.remark,
			};
			$.each(param, (index, val) => {
				if (val == undefined) {
					param[index] = null;
				} else if (typeof val == 'object' && new Date(val).getTime() > 0 && !isNaN(new Date(val).getTime())) {
					param[index] = this.$libs.formatDate(new Date(val), 'yyyy-MM-dd hh:mm:ss');
				}
			});
			if (this.isMust && !this.$libs.mustWrite(param)) {
				this.$message.error('请补充完整结清信息');
				this.$libs.noneAddHightBorder();
				return;
			}
			console.log(param);
			this.$http.post('/order/generalInfo/loanClear/' + _id, param).then((data) => {
				if (data.data.success) {
					this.isSave++;
				}
			}).catch((error) => {

			});
		},
		notaryMortgage(_id) {
			let param = {
				"borrowRegCertDate": this.notarialMortgage.CertificateOfRegistrationDate,
				"licensePlateNo": this.notarialMortgage.plateNumber,
				"mortgageId": this.notarialMortgage.mortgageId,
				"mrgeBackDate": this.notarialMortgage.mortgageGetByTrafficDate,
				"mrgeDate": this.notarialMortgage.mortgageDate,
				"mrgeSendCarAdminDate": this.notarialMortgage.mortgageToTrafficDate,
				"mrgeState": this.notarialMortgage.isMortgageSuccess,
				"notarPostDate": this.notarialMortgage.notarizationSendDate,
				"notarReceiptDate": this.notarialMortgage.notarizationGetDate,
				"notarSubmitDate": this.notarialMortgage.notarizationServeDate,
				"orderNo": _id,
				"regCertNo": this.notarialMortgage.notarizationCode,
				"regCertReceiptDate": this.notarialMortgage.notarizationAndinvoiceGetDate,
				"registryAddr": this.notarialMortgage.registrationAddress,
				"registryDate": this.notarialMortgage.registrationDate,
				"submitBankDate": this.notarialMortgage.mortgageToBankDate,
			};
			$.each(param, (index, val) => {
				if (val == undefined) {
					param[index] = null;
				} else if (typeof val == 'object' && new Date(val).getTime() > 0 && !isNaN(new Date(val).getTime())) {
					param[index] = this.$libs.formatDate(new Date(val), 'yyyy-MM-dd hh:mm:ss');
				}
			});
			if (this.isMust && !this.$libs.mustWrite(param)) {
				this.$message.error('请补充完整公证抵押信息');
				this.$libs.noneAddHightBorder();
				return;
			}
			console.log(param);
			this.$http.post('/order/generalInfo/notaryMortgage/' + _id, param).then((data) => {
				if (data.data.success) {
					this.isSave++;
				}
			}).catch((error) => {

			});
		},
		postBankCard(_id) {
			let param = {
				"billingDay": this.sendCardInfo.bankAccountDate,
				"debitDay": this.sendCardInfo.bankPayDate,
				"expressCompany": this.sendCardInfo.courierNumber,
				"expressNo": this.sendCardInfo.courierCompany,
				"firstRepayAmount": this.sendCardInfo.firstPay,
				// "isDeleted": 0,
				"lastRepayAmount": this.sendCardInfo.lastPay,
				"mailingAddress": this.sendCardInfo.address,
				"monthRepayAmount": this.sendCardInfo.monthPay,
				"orderNo": _id,
				"postCardId": this.sendCardInfo.postCardId,
				"postDate": this.sendCardInfo.sendDate,
				"remark": this.sendCardInfo.remark,
				"repayAccount": this.sendCardInfo.account,
				"repayDay": this.sendCardInfo.bankRepaymentDate
			};
			$.each(param, (index, val) => {
				if (val == undefined) {
					param[index] = null;
				} else if (typeof val == 'object' && new Date(val).getTime() > 0 && !isNaN(new Date(val).getTime())) {
					param[index] = this.$libs.formatDate(new Date(val), 'yyyy-MM-dd hh:mm:ss');
				}
			});
			if (this.isMust && !this.$libs.mustWrite(param)) {
				this.$message.error('请补充完整寄卡信息');
				this.$libs.noneAddHightBorder();
				return;
			}
			console.log(param);
			this.$http.post('/order/generalInfo/postBankCard/' + _id, param).then((data) => {
				if (data.data.success) {
					this.isSave++;
				}
			}).catch((error) => {

			});
		},
		powerDeal(_id, _power, _isMust) {
			this.isMust = _isMust;
			switch (_power) {
				case -1:
					this.isSave = 0;
					this.insurance(_id);
					this.accident(_id);
					this.carInfos(_id);
					this.contractSubmit(_id);
					this.depositForm(_id);
					this.loanClear(_id);
					this.notaryMortgage(_id);
					this.postBankCard(_id);
					break;
				case 0:
					this.insurance(_id);
					break;
				case 1:
					this.accident(_id);
					break;
				case 2:
					this.carInfos(_id);
					break;
				case 3:
					this.contractSubmit(_id);
					break;
				case 4:
					this.depositForm(_id);
					break;
				case 5:
					this.loanClear(_id);
					break;
				case 6:
					this.notaryMortgage(_id);
					break;
				case 7:
					this.postBankCard(_id);
					break;
				default:
					break;
			}
		},
	},
	mounted() {
		this.$store.commit('carOriginType', this);
		this.$store.commit('courierCompany', this);
		this.$store.commit('bank', this);
	}
}

</script>
<style lang="scss" scoped>
@import '../../assets/css/site.scss';
.synthesize {
	font-size: 14px;
	color: #475669;
	padding-top: 17px;
	.resultShrink {
		width: 812px;
	}
	.info-row .subTitle {
		padding-left: 10px;
	}
}

</style>
